<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 传统
        var f1 = function (a) {
            return a
        }
        console.log(f1(1))
        // ES6
        var f2 = a => a
        console.log(f2(1))
    </script>
</body>

</html> 